<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>连连看</title>
  <style>
    #container {
      overflow: hidden;
      width: 640px;
      height: 640px;
      margin: 100px auto 0;
      background-color: #198BE4;
    }
    .wrapper {
      float: left;
      box-sizing: border-box;
      width: 80px;
      height: 80px;
      border: 1px solid #198BE4;
      border-radius: 5px;
      font-size: 30px;
      line-height: 80px;
      text-align: center;
      color: #fff;
      background-color: #51BBFF;
    }
    .active {
      background-color: #198BE4;
    }
  </style>
</head>
<body>
  <div id="container">
    <template v-for="(rows, row) in map">
      <div class="wrapper" v-for="(item, col) in rows" :ref="'r'+row+'l'+col" @click="tapItem(row, col, item)">{{item}}</div>
    </template>
  </div>
  <script src="https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/lodash@4.17.5/lodash.min.js"></script>
  <script src="./index.js"></script>
</body>
</html>